<!-- 用户主页左栏 -->
<script setup>
import { useRouter } from 'vue-router';


import { ref } from 'vue'
// 导入图标
import {
    Document,
    Menu as IconMenu,
    Location,
    Setting,
    ChatLineSquare
} from '@element-plus/icons-vue'
// 使用路由
const router = useRouter();
// 监听按钮状态
const createArticle = () => {
    router.push({
        path: '/editor'
    })
}
// 修改资料
const jumpEmpty = () => {
    router.push({
        path: '/empty'
    })
}
// 用户主页
const jumpPanel = () => {
    router.push({
        path: '/admin/'
    })
}

// 跳转标签
const jumpContentment = () => {
    router.push({
        path: '/admin/contentment'
    })
}

// 跳转修改资料
const jumpProfile = () => {
    router.push({
        path: '/admin/profile'
    })
}

// 全部文章
const jumpArticle = () => {
    router.push({
        path: '/admin/article'
    })
}

const jumpTags = () => {
    router.push({
        path: '/userHome/tags'
    })
}
</script>

<template>
    <div class="left">
        <!-- 创建文章 -->
        <el-button type="success" @click="createArticle" style="margin-bottom: 15px;margin-left: 120px;">
            快速审核
        </el-button>
        <!-- 菜单组件 -->
        <el-menu class="el-menu-vertical-demo">
            <!-- 菜单1 -->
            <el-menu-item index="0" @click="jumpPanel" class="manage-container">
                <svg :class="icon" t="1721979999067" class="icon" viewBox="0 0 1024 1024" version="1.1"
                    xmlns="http://www.w3.org/2000/svg" p-id="12390" width="20" height="20">
                    <path
                        d="M153.6 870.4c96 96 224 147.2 358.4 147.2 134.4 0 262.4-51.2 358.4-147.2 96-96 147.2-217.6 147.2-352 0-19.2-19.2-38.4-38.4-38.4s-38.4 19.2-38.4 38.4c0 115.2-44.8 217.6-121.6 294.4-166.4 166.4-435.2 166.4-601.6 0s-166.4-435.2 0-601.6 435.2-166.4 601.6 0c12.8 12.8 25.6 25.6 38.4 44.8l-102.4-6.4c-19.2 0-38.4 12.8-44.8 38.4 0 19.2 12.8 38.4 38.4 44.8l185.6 12.8c12.8 0 25.6-6.4 32-12.8 0 0 6.4 0 6.4-6.4 6.4-6.4 12.8-19.2 12.8-25.6l6.4-185.6c0-19.2-19.2-38.4-38.4-44.8-19.2 0-38.4 19.2-44.8 38.4L902.4 192c-12.8-12.8-25.6-25.6-32-38.4C774.4 57.6 646.4 6.4 512 6.4 377.6 6.4 249.6 57.6 153.6 153.6S6.4 377.6 6.4 512c0 134.4 51.2 262.4 147.2 358.4z"
                        p-id="12391" fill="#515151"></path>
                    <path
                        d="M512 224c-19.2 0-38.4 19.2-38.4 38.4v243.2c0 19.2 19.2 38.4 38.4 38.4h243.2c19.2 0 38.4-19.2 38.4-38.4s-19.2-38.4-38.4-38.4H550.4V262.4c0-19.2-19.2-38.4-38.4-38.4z"
                        p-id="12392" fill="#515151"></path>
                </svg>
                <template #title>审核进度</template>
            </el-menu-item>

            <!-- 菜单2 -->
            <el-sub-menu index="1">
                <template #title>
                    <svg t="1721979247895" class="icon" viewBox="0 0 1024 1024" version="1.1"
                        xmlns="http://www.w3.org/2000/svg" p-id="4039" width="20" height="20" color="#515151">
                        <path
                            d="M469.2 350.1C414 376.4 370.3 421.7 346 477.8c-7 16.2 0.5 35.1 16.7 42.1 4.1 1.8 8.4 2.6 12.7 2.6 12.4 0 24.2-7.2 29.4-19.3 18.1-41.9 50.8-75.7 92-95.4 16-7.6 22.7-26.7 15.1-42.6C504.3 349.3 485.2 342.5 469.2 350.1z"
                            p-id="4040"></path>
                        <path
                            d="M797.6 545.8c-17.7 0-32 14.3-32 32 0 103.7-84.4 188.1-188.1 188.1-17.7 0-32 14.3-32 32s14.3 32 32 32c67.3 0 130.6-26.2 178.2-73.8 47.6-47.6 73.8-110.9 73.8-178.2C829.6 560.1 815.3 545.8 797.6 545.8z"
                            p-id="4041"></path>
                        <path
                            d="M1014.6 968.4 869.4 823.2c24.9-29.5 45.1-62.3 60.2-97.9 20-47.3 30.2-97.6 30.2-149.4s-10.2-102.1-30.2-149.4c-19.3-45.7-47-86.8-82.3-122-35.2-35.2-76.3-62.9-122-82.3-47.3-20-97.6-30.2-149.4-30.2s-102.1 10.2-149.4 30.2c-45.7 19.3-86.8 47-122 82.3-35.2 35.2-62.9 76.3-82.3 122-20 47.3-30.2 97.6-30.2 149.4s10.2 102.1 30.2 149.4c19.3 45.7 47 86.8 82.3 122 35.2 35.2 76.3 62.9 122 82.3 47.3 20 97.6 30.2 149.4 30.2s102.1-10.2 149.4-30.2c36.1-15.3 69.2-35.7 98.9-61l145.2 145.2c6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4C1027.1 1001.2 1027.1 980.9 1014.6 968.4zM575.9 895.7C399.5 895.7 256 752.2 256 575.8s143.5-319.9 319.9-319.9 319.9 143.5 319.9 319.9S752.2 895.7 575.9 895.7z"
                            p-id="4042"></path>
                        <path
                            d="M319 960 140 960c-41.9 0-76-34.1-76-76l0-744c0-41.9 34.1-76 76-76l680 0c41.9 0 76 34.1 76 76l0 92.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-92.7c0-77.2-62.8-140-140-140L140 0c-77.2 0-140 62.8-140 140l0 744c0 77.2 62.8 140 140 140l179 0c17.7 0 32-14.3 32-32S336.7 960 319 960z"
                            p-id="4043"></path>
                    </svg>
                    <span> 快速审核</span>
                </template>
                <el-menu-item-group>
                    <!-- <template #title><span>资料操作</span></template> -->
                    <el-menu-item index="2-1" @click="jumpArticle"> 审核文章</el-menu-item>
                    <el-menu-item index=" 2-2" @click="jumpContentment">审核评论</el-menu-item>
                </el-menu-item-group>
            </el-sub-menu>
            <!-- 菜单3 -->
            <el-menu-item index="2" @click="jumpProfile">
                <template #title>
                    <svg t="1721982635449" class="icon" viewBox="0 0 1024 1024" version="1.1"
                        xmlns="http://www.w3.org/2000/svg" p-id="15826" width="20" height="20">
                        <path
                            d="M537.216 1003.776h-427.52c-27.072 0-52.8-11.456-70.592-31.296a76.352 76.352 0 0 1-19.904-58.88l-0.192-60.16a32 32 0 0 1 64 0v63.872c-0.384 5.44 0.576 8.832 3.968 12.608a30.656 30.656 0 0 0 22.72 9.856h427.52a32 32 0 0 1 0 64z"
                            fill="#2c2c2c" p-id="15827"></path>
                        <path
                            d="M50.752 934.144a32 32 0 0 1-32-32v-60.032a457.536 457.536 0 0 1 277.952-421.12 32.192 32.192 0 0 1 42.048 16.832 32.128 32.128 0 0 1-16.896 42.112 393.408 393.408 0 0 0-239.104 362.24v60.032a32 32 0 0 1-32 31.936z"
                            fill="#2c2c2c" p-id="15828"></path>
                        <path
                            d="M460.736 514.496a247.36 247.36 0 0 1-247.104-247.104A247.424 247.424 0 0 1 460.736 20.224a247.424 247.424 0 0 1 247.168 247.168 247.36 247.36 0 0 1-247.168 247.104z m0-430.272a183.36 183.36 0 0 0-183.104 183.168 183.296 183.296 0 0 0 183.104 183.104 183.36 183.36 0 0 0 183.168-183.104 183.36 183.36 0 0 0-183.168-183.168zM778.56 829.376c-42.944 0-77.888-34.944-77.888-77.888s34.944-77.888 77.888-77.888 77.888 34.944 77.888 77.888-34.944 77.888-77.888 77.888z m0-110.976a33.216 33.216 0 1 0 0.064 66.368 33.216 33.216 0 0 0-0.064-66.368z"
                            fill="#2c2c2c" p-id="15829"></path>
                        <path
                            d="M834.56 960.384a22.4 22.4 0 0 1-22.144-19.2 35.2 35.2 0 0 0-34.56-30.208c-17.152 0-32 12.864-34.624 30.016a22.272 22.272 0 0 1-28.736 17.984 217.536 217.536 0 0 1-84.352-49.344 22.4 22.4 0 0 1 1.28-33.728 35.136 35.136 0 0 0 8.32-44.864 35.84 35.84 0 0 0-42.88-15.04 22.4 22.4 0 0 1-29.76-15.936c-3.712-16.448-5.632-32.768-5.632-48.64s1.92-32.192 5.632-48.64a22.144 22.144 0 0 1 11.2-14.72 22.528 22.528 0 0 1 18.496-1.216 34.944 34.944 0 1 0 34.56-59.968 22.336 22.336 0 0 1-8.192-16.64 21.248 21.248 0 0 1 6.976-16.96 217.472 217.472 0 0 1 84.352-49.28 22.4 22.4 0 0 1 28.672 18.048 35.328 35.328 0 0 0 34.624 29.952 35.2 35.2 0 0 0 34.56-30.208 22.4 22.4 0 0 1 28.608-18.304 217.6 217.6 0 0 1 85.248 49.088 22.336 22.336 0 0 1-1.472 34.048 34.88 34.88 0 0 0-8.896 45.056 35.84 35.84 0 0 0 43.776 14.784 22.592 22.592 0 0 1 30.208 15.552 214.336 214.336 0 0 1 0 98.816 22.592 22.592 0 0 1-30.336 15.552 35.456 35.456 0 0 0-43.648 14.72 35.008 35.008 0 0 0 8.96 45.184 22.4 22.4 0 0 1 1.408 34.048 218.368 218.368 0 0 1-85.312 49.024 19.584 19.584 0 0 1-6.336 1.024z m-56.768-94.144c30.144 0 57.024 17.216 70.592 42.752 10.624-4.736 20.864-10.624 30.528-17.536a79.232 79.232 0 0 1-1.728-82.56 81.024 81.024 0 0 1 72.832-39.744 164.16 164.16 0 0 0 0-35.264 81.28 81.28 0 0 1-72.768-39.68 80.128 80.128 0 0 1 1.792-82.496 166.336 166.336 0 0 0-30.656-17.664c-13.504 25.6-40.448 42.816-70.592 42.816-29.824 0-56.64-17.024-70.336-42.304a179.072 179.072 0 0 0-30.336 17.792c15.104 24.384 16.256 55.68 1.28 81.792-14.528 25.216-43.008 42.432-71.296 39.872a147.776 147.776 0 0 0 0 35.008 83.84 83.84 0 0 1 71.296 39.744c15.04 26.24 13.888 57.536-1.216 81.92 9.472 6.976 19.648 12.928 30.336 17.792 13.696-25.216 40.512-42.24 70.272-42.24z"
                            fill="#2c2c2c" p-id="15830"></path>
                    </svg>
                    <span>管理资料与密码</span>
                </template>
            </el-menu-item>
            <el-menu-item index="3" @click="jumpEmpty">
                <el-icon>
                    <setting />
                </el-icon>
                <template #title>设置</template>
            </el-menu-item>
        </el-menu>
    </div>
</template>


<style>

/* 样式 */
.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 350px;
    border-radius: 10px;
    margin-left: 120px;
}

.icon {
    margin-right: 8px;
    /* 调整图标和文字之间的间距 */
}

.manage-container {
    display: flex;
    align-items: center;
}
</style>
  